<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta descript="用于 Puppateer 测试页面">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Puppateer</title>
    <script>
        var xhr = new XMLHttpRequest();

        // xhr.open("get", "https://dog.ceo/api/breeds/image/random?name=zhangsan&age=19", true);
        xhr.open("post", "http://localhost:3000/post", true);
        xhr.send({
            userid: '123',
            password: '123123'
        });

        xhr.onload = () => {
            // console.log('HTML 输出', xhr.response);
        }

        function btnClick() {
            console.log('btnClick')
        }
    </script>
</head>

<body>
    <h1 id="page1">page $1</h1>
    <h1 id="page2">page $2</h1>
    <input type="text" />
    <button id="btn" onclick="btnClick()">btnClick</button>
</body>

</html>